<template>
  <form>
    <div class="main">
      <div class="left"><span><el-button @click="cardsubmit">确认</el-button></span>
      </div>
      <div class="center">
        <div><h1>欢迎您使用ATM机，请输入银行卡号</h1></div>
        <div><el-input
            placeholder="请输入银行卡号" v-model="input"> </el-input></div>
      </div>
      <div class="right">
        <span><el-button  native-type="reset">更改</el-button></span>
      </div>
    </div>
  </form>
</template>

<script>
import jsCookie from 'js-cookie';
export default {
  
  data() {
    
    return {
      input: "",
    }    
  },
  methods: {
    cardsubmit(){
     if(this.input ==""){
       this.$message({
         showClose: true,
         message: "请输入银行卡号",
         type: "error",
       });
     }
      else {

        jsCookie.set('cardnumber',this.input);
       console.log(jsCookie.get('cardnumber'));
       this.$router.push({ path: "../WaitView1" });}
    }
  },
  mounted() {

    this.cardsubmit();
  }
}
</script>

<style >
.main{
  display:flex;
  justify-content: space-between;
  width: 100%;
  height: 750px;
  background: url("../../assets/中国银行图片.png")  no-repeat center fixed;
  background-size: cover;
}
.left{
  padding-top: 300px;
  box-sizing: border-box;
  width:300px;
  height:750px;

}
.center{
  padding-top: 50px;
  box-sizing: border-box;
  width:900px;
  height:750px;
  text-align: center;
}
.right{
  padding-top: 300px;
  box-sizing: border-box;
  text-align: right;
  width:300px;
  height:750px;

}
</style>